      SUBROUTINE QUIKVIS5Y(T50,FIRSTNODE,NUMNODES,DELNODE)
      IMPLICIT REAL*8 (A-H,O-Z)
C
C THIS ROUTINE IS PART OF THE QUIKVIS PROGRAM.  IT RETURNS THE FIRST
C RAAN, THE RAAN INCREMENT, AND THE NUMBER OF RAAN'S INVOLVED.  IF THE
C RAAN'S ARE DEFINED IN TERMS OF THE MEAN SOLAR TIME OF THE ASCENDING
C NODE, THEN THE FIRST RAAN IS A FUNCTION OF T50.
C
C
C VARIABLE DIM TYPE I/O DESCRIPTION
C -------- --- ---- --- -----------
C
C T50       1   R*8  I  USED ONLY WHEN NODEOPT=2. IE, WHEN ORBIT RAAN IS
C                       DEFINED IN TERMS OF THE MEAN SOLAR TIME OF THE
C                       ASCENDING NODE.  THIS IS THE TIME USED AT WHICH
C                       THE MEAN SUN POSITION IS COMPUTED. IN SECONDS
C                       SINCE 1/1/50, 0.0 HR.
C
C FIRSTNODE 1   R*8  O  THE FIRST ORBIT NODE IN THE RANGE OF NODES THAT
C                       THE QUIKVIS PROGRAM IS CONSIDERING. IN RADIANS.
C
C NUMNODES  1   I*4  O  THE NUMBER OF ORBIT NODES BEING CONSIDERED.
C
C DELNODE   1   R*8  O  THE INCREMENT BETWEEN ORBIT NODES. IN RADIANS.
C
C***********************************************************************
C
C BY C PETRUZZO/GFSC/742.   2/86.
C       MODIFIED....
C
C***********************************************************************
C
      INCLUDE 'QUIKVIS.INC'
C
      REAL*8 XPLUS(3)/1.D0,0.D0,0.D0/, XMINUS(3)/-1.D0,0.D0,0.D0/
C
C
      IF(NODEOPT.EQ.1) THEN
C      RAAN'S DEFINED DIRECTLY
C
        NUMNODES = NUMRAAN
        DELNODE = DELRAAN
        FIRSTNODE = RAAN1
C
      ELSE IF(NODEOPT.EQ.2) THEN
C      RAAN'S DEFINED IN TERMS OF THE NODE'S MEAN SOLAR TIME
C
        NUMNODES = NUMSOLT
        DELNODE = DELSOLT/86400.D0 * TWOPI
C      GET FIRSTNODE VALUE.
        XNODE1 = 0.D0
        ST1 = TIMLOC(T50,XPLUS,1,0)
        XNODE2 = PI
        ST2 = TIMLOC(T50,XMINUS,1,0)
        IF(ST2.LT.ST1) ST2 = ST2 + 86400.D0
        FIRSTNODE = XINTERP(SOLTIM1,ST1,ST2,XNODE1,XNODE2,LUERR,KDUM)
        IF(IBUG.NE.0) WRITE(LUBUG,7011)
     *        ST1/3600.D0,XNODE1*DEGRAD,
     *        ST2/3600.D0,XNODE2*DEGRAD,
     *        SOLTIM1/3600.D0,FIRSTNODE*DEGRAD
 7011   FORMAT(/,
     *    ' QUIKVIS5Y DEBUG 7011. INTERPOLATION INFO.'/,
     *    '   ST1(HR),XNODE1(DEG)=       ',2G13.5/,
     *    '   ST2(HR),XNODE2(DEG)=       ',2G13.5/,
     *    '   SOLTIM1(HR),FIRSTNODE(DEG)=',2G13.5)
        FIRSTNODE = EQVANG(FIRSTNODE)
C
      ELSE
        STOP   ' QUIKVIS5Y. CODING ERROR. SEE CODE. STOP 1.'
        END IF
C
      RETURN
C
C***********************************************************************
C
C
C**** INITIALIZATION CALL. PUT GLOBAL PARAMETER VALUES INTO THIS
C     ROUTINE'S LOCAL VARIABLES.
C
      ENTRY QVINIT5Y
C
      CALL QUIKVIS999(-1,R8DATA,I4DATA,L4DATA)
      RETURN
C
C***********************************************************************
C
      END
